package com.xhs.main.service.cwb.impl;

import com.xhs.main.dao.cwb.CwbQuarterlyRevenueDao;
import com.xhs.main.entity.cwb.CwbQuarterlyRevenue;
import com.xhs.main.service.cwb.CwbQuarterlyRevenueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * create by ljw on 2020/10/16
 *
 */

@Service
public class CwbQuarterlyRevenueServiceImpl implements CwbQuarterlyRevenueService {

    @Autowired
    CwbQuarterlyRevenueDao cwbQuarterlyRevenueDao;

    @Override
    public void addCwbQuarterlyRevenue(CwbQuarterlyRevenue cwbQuarterlyRevenue) {
        cwbQuarterlyRevenueDao.insertCwbQuarterlyRevenue(cwbQuarterlyRevenue);
    }

    @Override
    public List<CwbQuarterlyRevenue> getAllCwbQuarterlyRevenue() {
        List<CwbQuarterlyRevenue> cwbQuarterlyRevenues = cwbQuarterlyRevenueDao.selectAllCwbQuarterlyRevenue();
        return cwbQuarterlyRevenues;
    }

    @Override
    public CwbQuarterlyRevenue getOneByID(Integer cwbTId) {
        CwbQuarterlyRevenue cwbQuarterlyRevenue = cwbQuarterlyRevenueDao.selectOneByID(cwbTId);
        return cwbQuarterlyRevenue;
    }

    @Override
    public Double getAllMoney() {
        Double money = cwbQuarterlyRevenueDao.selectAllMoney();
        return money;
    }
}
